The present invention relates to an apparatus, a method, a program, and a recording medium for image processing and, particularly, to an apparatus, a method, a program, and a recording medium for image processing that, in converting an interlaced scanning image into a progressive scanning image, improve vertical resolution in a still image area, smoothly interpolate an edge in a moving image area, and prevent an error in the conversion.
Techniques for converting an interlaced scanning image into a progressive scanning image (IP conversion) are widely spreading.
The interlaced scanning system scans every other scanning line of an actual display image (performs scanning by skipping every other scanning line). One image scanned by the interlaced scanning system is referred to as a field. When continuous images are displayed, adjacent fields have pixels displaced from each other by one scanning line, and such continuous fields are displayed alternately.
As opposed to the interlaced scanning system, the progressive scanning system scans all scanning lines of the display image. Hence, the process of converting an interlaced scanning image into a progressive scanning image is that of interpolating pixels on lines with no pixels in the interlaced scanning image using originally present pixels, and thereby generating pixels on all the scanning lines.
Conventional interpolation methods include a method referred to as double writing, which scans each scanning line twice by display with a delay corresponding to one scanning line, and a method of linear interpolation using pixels in a vertical direction.
In addition, a method has been proposed which uses information of a plurality of fields to enhance vertical resolution. Since, in the case of continuous fields of the interlaced scanning system, a field immediately preceding a current field is displaced by one scanning line in relation to the current field, as described above, a pixel on the immediately preceding field is present at a position to be interpolated on the current field. Specifically, when the pixel to be interpolated is a still image pixel, the pixel on the immediately preceding field is used as it is for interpolation, and in the case that the pixel to be interpolated is a moving image pixel, the pixel to be interpolated is interpolated by linear interpolation using an upper and a lower pixel on the current field.
However, when the above double writing method is used, for example, an image representing an oblique edge is displayed as large steps as a result of the IP conversion.
In addition, although the linear interpolation improves the display image as compared with the double writing, the linear interpolation may result in a slightly blurred display. Furthermore, as in the case of the double writing, an oblique edge is displayed as steps as a result of the linear interpolation.
In order to prevent a stepwise display of an edge in an oblique direction, a method has been proposed which carries out IP conversion while detecting the direction of the edge. The method is disclosed in Japanese Patent Laid-Open No. Hei 3-42832. The method determines the differences in absolute values of three sets of pixels; i.e., a set of an upper and a lower pixel, a set of an upper right and a lower left pixel, and a set of a lower right and an upper left pixel with a remarked pixel to be interpolated as a center, and then interpolates the remarked pixel by using a combination of pixels having the lowest value. When all the values are higher than a predetermined value, the method interpolates the remarked pixel by copying the value of the upper pixel. Thus, even when an oblique edge is present, the method enables smooth interpolation in a direction of the oblique edge.
However, although the method of carrying out conversion while detecting the direction of the edge improves the display of the oblique edge, the method unfavorably lowers vertical resolution in a still image area as compared with the method using a plurality of fields. Moreover, when applied to an actual image, the method of carrying out conversion while detecting the direction of the edge may calculate correlation in the oblique direction somewhat higher than in the vertical direction, depending on noise or conditions of illumination, for example. This tends to result in an error in which an actual pattern continuous in the vertical direction is not displayed correctly.
In addition, a common video signal or the like includes only a slight high-frequency component, and thus an edge appears only as a blurred image. Therefore, it is difficult to detect the direction of a local edge accurately, and even when an edge in a specific direction is to be enhanced, a plurality of edge directions are detected as candidates, which renders selection impossible. As a result, the image can be generated only with the same level of image quality as that of the conventional linear interpolation.